package com.teatrace.service.cfg;

import java.io.IOException;
import java.util.Properties;

import org.apache.log4j.Logger;

public class Configure {
	
	private static final Logger log = Logger.getLogger(Configure.class);

	private static Properties config = new Properties();
	
	static {
		try {
			config.load(Configure.class.getClassLoader().getResourceAsStream("config.properties"));
		} catch (IOException e) {
			log.error(e.getMessage(), e);
		}
	}
	
	public static int getInt(String key) {
		return Integer.parseInt(config.getProperty(key));
	}
	
	public static String get(String key) {
		return config.getProperty(key);
	}
}
